package plus;

import java.util.*;

public final class Hypo {
	Map<Type, Type> assignment = new HashMap<Type, Type>();

	public void assume(Type a, Type b) {
		assignment.put(rep(a), rep(b));
	}
	Type rep(Type it) {
		assert it != null;
		while (true) {
			it = it.chase();
			Type that = assignment.get(it);
			if (that == null) return it;
			else it = that;
		}
	}
}
